<!DOCTYPE html>
<html>
<head>
    <title>收款二维码</title>
    <meta name="name" content="content,scale=1.0">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="../css/aui-flex.css">
    <link rel="stylesheet" href="../css/aui.css">
    <style>
        body{
            background: #fff;
        }
        #qrcode{
            text-align: center;
            margin-top: 20px;
        }
        #qrcode img{
            margin: 0 auto;
        }
        .tips{
            font-weight: bold;
            color:red;
            /*width: 100%;*/
            text-align: center;
            margin-top: 30px;
        }
        .logo{
            text-align: center;
        }
        .tips2{
            text-align: center;
            color:#282c5b;
            margin-top: 25px;
        }
        .tips2 p{
            line-height: 12px;
        }
    </style>
</head>
<body>
<div class="suipplirName font-weight-700 aui-text-center aui-padded-t-15">----</div>
<div id="qrcode">
</div>
<div class="tips aui-col-xs-8 margin-0-auto">
扫码向尚景合作商家支付</div>
<script type="text/javascript" src="../script/api.js"></script>
<script src="../script/qrcode.js"></script>
<script src="../script/common.js"></script>
<script src="../script/jquery-1.11.3.js"></script>
<script>
    //获取url中的参f数
    var qrId="";
    apiready = function () {
        api.parseTapmode();
        getUserInfo();

        setQRUrl();

    }
//    $(function () {
//        var qrcode = new QRCode(document.getElementById("qrcode"), {
//            width : 200,//设置宽高
//            height : 200
//        });
//        var url="http://www.gzjinlanren.com/mobile/register.php?tj=18718341993";
//        qrcode.makeCode("http://www.aijiangli.com/yii/web/jianfu/pay?sid=249");
////        setQRUrl();
//    })
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
    function setQRUrl(){
        var qrcode = new QRCode(document.getElementById("qrcode"), {
            width : 200,//设置宽高
            height : 200
        });
        $(".tips").text(changeNumFormat($(".tips").text(),4))
//        var host=window.location.host;
//        var url="http://"+host+"/mobile/register.php?tj="+getUrlParam("tj");



        data = {
        };
        url = "supplier/pay_qrcode";
        isLock = true;
        ajaxRequest(url, 'get', data, function (ret, err) {
//            $(".suipplirNameTips").text(userInfo_data.supplier_info.supplier_name)

           var url=ret.data;
            qrcode.makeCode(url);
            $(".suipplirName").text(company_name);
        });
        // alert(url)

    }
</script>
</body>
</html>

<script>

    // alert(getUrlParam("dd"))
</script>